use std::fmt::Debug;

fn main() {
    println!("Hello, world!");
    let x = return_str();
    println!("{}", x);
    let x = 7;
    let ref_x = Ref(&x);

    print_ref(&ref_x);
    print(ref_x);
}

#[derive(Debug)]
struct Ref<'a, T: 'a>(&'a T);

fn print<T>(t: T) where T: Debug {
    println!("`print`: t is {:?}", t);
}

fn print_ref<'a, T>(t: &'a T) where T: Debug + 'a {
    println!("`print_ref`:t is {:?}", t);
}

fn return_str() -> String {
    let mut string = String::new();
    for _ in 0..10 {
        string.push_str("ACTG");
    }
    string
}